package com.mindbook.test.controller.user;

import com.mindbook.test.entity.user.User;
import com.mindbook.test.mapper.user.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author wxb
 * @Datatime 2020/6/2 17:31
 * @Descript
 */
@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    private UserMapper userMapper;

    @GetMapping("/{id}")
    private String selectById(@PathVariable Integer id){
        User user = userMapper.selectByPrimaryKey(id);
        return user.toString();
    }


}
